<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterCruiseCheckSelfDetailAddExecuteTime extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('cruise_check_self_detail', function (Blueprint $table) {
            $table->unsignedBigInteger("executeStartTime")->default(0)->comment("执行开始时间")->after("cruiseOrderId");
            $table->unsignedBigInteger("executeEndTime")->default(0)->comment("执行结束时间")->after("executeStartTime");
            $table->unsignedTinyInteger("sysTemplate")->default(0)->comment("模板类型")->after("templateType");
            $table->unsignedBigInteger("finishTime")->default(0)->comment("完成时间")->after("executeEndTime");
            $table->unsignedBigInteger("submitUid")->default(0)->comment("提交用户uid")->after("finishTime");
            $table->string("submitUsername", 64)->default("")->comment("提交用户username")->after("submitUid");
            $table->unsignedBigInteger("checkDetailsId")->default(0)->comment("cruise_check_details.id")->after("cruiseOrderId");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('cruise_check_self_detail', function (Blueprint $table) {
            $table->dropColumn([
                "executeStartTime",
                "executeEndTime",
                "sysTemplate",
                "finishTime",
                "submitUid",
                "submitUsername",
                "checkDetailsId"
            ]);
        });
    }
}
